package com.ruoyi.service.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.service.mapper.ServiceServedMapper;
import com.ruoyi.service.domain.ServiceServed;
import com.ruoyi.service.service.IServiceServedService;

/**
 * 被服务人信息Service业务层处理
 * 
 * @author ZDL
 * @date 2024-11-27
 */
@Service
public class ServiceServedServiceImpl implements IServiceServedService 
{
    @Autowired
    private ServiceServedMapper serviceServedMapper;

    /**
     * 查询被服务人信息
     * 
     * @param servedId 被服务人信息主键
     * @return 被服务人信息
     */
    @Override
    public ServiceServed selectServiceServedByServedId(Long servedId)
    {
        return serviceServedMapper.selectServiceServedByServedId(servedId);
    }

    /**
     * 查询被服务人信息列表
     * 
     * @param serviceServed 被服务人信息
     * @return 被服务人信息
     */
    @Override
    public List<ServiceServed> selectServiceServedList(ServiceServed serviceServed)
    {
        return serviceServedMapper.selectServiceServedList(serviceServed);
    }

    /**
     * 新增被服务人信息
     * 
     * @param serviceServed 被服务人信息
     * @return 结果
     */
    @Override
    public int insertServiceServed(ServiceServed serviceServed)
    {
        return serviceServedMapper.insertServiceServed(serviceServed);
    }

    /**
     * 修改被服务人信息
     * 
     * @param serviceServed 被服务人信息
     * @return 结果
     */
    @Override
    public int updateServiceServed(ServiceServed serviceServed)
    {
        return serviceServedMapper.updateServiceServed(serviceServed);
    }

    /**
     * 批量删除被服务人信息
     * 
     * @param servedIds 需要删除的被服务人信息主键
     * @return 结果
     */
    @Override
    public int deleteServiceServedByServedIds(Long[] servedIds)
    {
        return serviceServedMapper.deleteServiceServedByServedIds(servedIds);
    }

    /**
     * 删除被服务人信息信息
     * 
     * @param servedId 被服务人信息主键
     * @return 结果
     */
    @Override
    public int deleteServiceServedByServedId(Long servedId)
    {
        return serviceServedMapper.deleteServiceServedByServedId(servedId);
    }
}
